<template>
	<div>
		<el-dialog title="充值" :visible.sync="dialogVisible" :close-on-click-modal="false" width="600px" center @close="cancelClick">
			<div class="service-page">
                <div class="service-box">
                    <div class="fs-20 t-cen t-three marg-B1 fw-7">100</div>
                    <div class="fs-20 t-cen marg-T2 marg-B2 t-three">
                        微信客服
                    </div>
                    <div class="wx-pic marg-B2">
                        <img src="../assets/images/code-pic.png" />
                    </div>
                    <div class="fs-14 t-cen t-three fw-5 padd-B3">
                        请用手机扫码支付
                    </div>
                </div>
            </div>
		</el-dialog>
	</div>
</template>
<script>
import {request} from "../assets/js/utils/request";
export default {
    props: ['isTrans','depList','dataInfo'],
    data() {
        return {
            dialogVisible: false,
            keywords: '',
            depart: '',
			dataList: [],
			branchId: '',
			activeIndex: '',
			intergralVisible: false,
			money: ''
        }
    },
	created() {
		this.getListData()
	},
    methods: {
        departChange(params) {
			this.branchId = params.branch_id
			this.getListData()
        },
        searchTab() {

        },
        submit() {

        },
		comfirmClick() {
			const formData = new FormData();
			formData.append('to_uid',this.integralData.uid);
			formData.append('money',this.money)
			request({
				url: `/user/money/transfer`,
				method: 'POST',
				data: formData
			}).then(res => {
				if(res.code == 200) {
					this.dataList = res.data.list || []
				}
			})
		},
		activeClick(item) {
			this.activeIndex = item.uid
			this.selectUid = item.uid
			this.$emit('intergralOther',item)
		},
		getListData() {
			request({
				url: `/user/lawyer/list?branch_id=${this.branchId}`,
				method: 'GET'
			}).then(res => {
				if(res.code == 200) {
					this.dataList = res.data.list || []
				}
			})
		},
		cancelClick() {
			this.dialogVis = false
			this.$emit('transClose')
		},
		sureClick() {
			const formData = new FormData();
			formData.append('buy_id', this.buyId);
			formData.append('to_uid', this.selectUid)
			request({
				url: '/user/clue/shift',
				method: 'POST',
				data: formData
			}).then(res => {
				if(res.code == 200) {
					this.dialogVis = false
					this.$emit('transferSure')
					this.$message({
						message: '成功',
						type: 'success'
					})
				}
			})
		}
    }, 
    watch: {
        isTrans(newVal) {
            this.dialogVisible = newVal
            this.detail = this.dataInfo
        }
    }
}
</script>
<style lang="less" scoped>
.service-page{
    padding: 30px;
    border-radius: 8px;
    background: #fff;
    .service-box{
        width: 400px;
        margin: 0 auto;
        .pic{
            image{
                width: 45px;
            }
        }
        .wx-pic{
            width: 150px;
            height: 150px;
            line-height: 150px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 1);
            border: 2px solid rgba(229, 229, 229, 1);
            margin: 0 auto;
            text-align: center;
            img{
                width: 120px;
                vertical-align: middle;
            }
        }
    }
}
/deep/.el-dialog{
    border-radius: 15px;
}
</style>